package org.example.computerdesign.exception;

import lombok.Getter;
import org.example.computerdesign.common.enums.HttpCode;
/**
 * @author 朱文权
 * */
@Getter
public class ServiceException extends RuntimeException{
    /**
     * 错误码
     * */
    private Integer code;
    public ServiceException(String msg,Integer code){
        super(msg);
        this.code=code;
    }
    public ServiceException(HttpCode httpCode){
        super(httpCode.getMsg());
        this.code=httpCode.getCode();
    }
}
